#ifndef _PROJECTILE_H_
#define _PROJECTILE_H_

#ifdef _WIN32
#pragma once
#endif

#include "constants.h"
#include "map.h"
#include "mapcontainer.h"
#include "movable_entity.h"
#include "entitycontainer.h"
#include "timer.h"

class CProjectile : public CMovableEntity
{
public:
    CProjectile(const string &szProjectileName, const ENTITY_ID &nId,
                const float fX, const float fY, const float fZ);
    CProjectile(const string &szProjectileName, const string &szMesh,
                const ENTITY_ID &nId, const float fX, const float fY, 
                const float fZ);
    ~CProjectile();

    D3DXVECTOR3 getVelocity() const;
    void setVelocity(D3DXVECTOR3 vecVelocity);
    void setVelocity(float fX, float fY, float fZ);
    float getXVelocity() const;
    float getYVelocity() const;
    float getZVelocity() const;
    void setXVelocity(float fX);
    void setYVelocity(float fY);
    void setZVelocity(float fZ);

    virtual void tick();

    void setInMotion(bool bInMotion);
    bool getInMotion() const;

private:
    bool m_bInMotion;
    D3DXVECTOR3 m_vecVelocity;

    CTimer m_LastAnimatedTime;
};

#endif